<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>This Library's Relationship to Boost.Iterator</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../stl_interfaces.html" title="Chapter 39. Boost.STLInterfaces">
<link rel="prev" href="../stl_interfaces.html" title="Chapter 39. Boost.STLInterfaces">
<link rel="next" href="the__v1__and__v2__namespaces__and_the_use_of_c__20_concepts.html" title="The v1 and v2 Namespaces, and the Use of C++20 Concepts">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../index.html">Home</a></td>
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../stl_interfaces.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../stl_interfaces.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="the__v1__and__v2__namespaces__and_the_use_of_c__20_concepts.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_stlinterfaces.this_library_s_relationship_to_boost_iterator"></a><a class="link" href="this_library_s_relationship_to_boost_iterator.html" title="This Library's Relationship to Boost.Iterator">This
    Library's Relationship to Boost.Iterator</a>
</h2></div></div></div>
<p>
      <a href="https://www.boost.org/doc/libs/release/libs/iterator" target="_top">Boost.Iterator</a>
      is a library that is already in Boost, and it has been around for a long time.
    </p>
<p>
      However, it was attempting to solve a lot of problems related to iterators,
      not just how to write them from scratch. It is also not easy to modernize it
      for use in C++11 and later. Specifically:
    </p>
<p>
      - <a href="https://www.boost.org/doc/libs/release/libs/iterator" target="_top">Boost.Iterator</a>
      contains a large number of iterator adaptors; those have since been rendered
      moot by C++20 ranges.
    </p>
<p>
      - <a href="https://www.boost.org/doc/libs/release/libs/iterator" target="_top">Boost.Iterator</a>'s
      <code class="computeroutput"><span class="identifier">iterator_facade</span></code> template is
      not limited just to the existing standard C++ iterator categories; that was
      an experiment that never landed in standard C++, so it adds needless complexity.
    </p>
<p>
      - <a href="https://www.boost.org/doc/libs/release/libs/iterator" target="_top">Boost.Iterator</a>'s
      <code class="computeroutput"><span class="identifier">iterator_facade</span></code> was written
      against C++98, so it is not <code class="computeroutput"><span class="keyword">constexpr</span></code>-
      and <code class="computeroutput"><span class="keyword">noexcept</span></code>-friendly.
    </p>
<p>
      - <a href="https://www.boost.org/doc/libs/release/libs/iterator" target="_top">Boost.Iterator</a>'s
      <code class="computeroutput"><span class="identifier">iterator_facade</span></code> does not support
      proxy iterators, which are fully supported by the C++20 iterator concepts.
    </p>
<p>
      - There is opportunity to reduce the amount of code the user must write in
      order to use <code class="computeroutput"><span class="identifier">iterator_facade</span></code>.
    </p>
<p>
      - <a href="https://www.boost.org/doc/libs/release/libs/iterator" target="_top">Boost.Iterator</a>
      contains two templates, <code class="computeroutput"><span class="identifier">iterator_facade</span></code>
      and <code class="computeroutput"><span class="identifier">iterator_adaptor</span></code>, that
      represent two ways of writing a new iterator while writing as little code as
      possible. It would be nice to have the functionality for both available in
      one template, but it is difficult to unify those two templates as written.
    </p>
<p>
      For these reasons, it seems more appropriate to introduce a new Boost library
      than to try and address the shortcomings of <a href="https://www.boost.org/doc/libs/release/libs/iterator" target="_top">Boost.Iterator</a>'s
      <code class="computeroutput"><span class="identifier">iterator_facade</span></code> and <code class="computeroutput"><span class="identifier">iterator_adaptor</span></code> templates directly.
    </p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2019 T. Zachary Laine<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../stl_interfaces.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../stl_interfaces.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="the__v1__and__v2__namespaces__and_the_use_of_c__20_concepts.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
